/*********************************************************************
 *  File:        ContigBuilder.h
 *  Author:      Lishan Li                                        
 *  Date:        May, 2003                                                 
 *
 *  Description: This ContigBuilder class is used to process contigs  
 *               formed from GA.
 *********************************************************************/

#ifndef CONTIGBUILDER_H
#define CONTIGBUILDER_H

#pragma warning(disable: 4786)

#include <iostream>
#include <string>
#include <vector>

#include "Util.h"
#include "ConsensusBuilder.h"

#include "newGA.hh"

using namespace std;

class ContigBuilder
{
public:
	ContigBuilder(int * order, int ** s, const newGA::Problem *pbm);  // constructor
	~ContigBuilder() { }                   // destructor

	void buildContigs();
	void buildConsensus();
	void mergeContigs();
	void mergeTwoContig(int cid1, int cid2);
	void print();
	void printOrder();
	vector<string> getPreLayoutFrags(vector<int> order);
	vector< vector<int> > getAllContigs() { return allContigs; }
private:
	int * fragOrder;                       // fragment order generated by GA
	int ** score;                          // pointer to score in OverlapDetector class
	vector< vector<int> > allContigs;      // set of contigs
	const newGA::Problem *_pbm;
};

#endif

/************************************ End of File **************************************/
